package com.nuoniu.sibanyun.mapper.crm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.crm.CrmUserField;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 用户显示字段策略 Mapper 接口
 * </p>
 *
 * @author baiqiang
 * @since 2020-06-23
 */
@Mapper
@Component
public interface CrmUserFieldMapper extends BaseMapper<CrmUserField> {

    /**
     * 获取用户字段
     * @author 小啊刚
     * @date 2020/6/23
     */
    @Select("select * from crm_user_field where type = #{type} and create_user_id = #{createUserId}")
    CrmUserField getFiled(CrmUserField field);

    /**
     * 修改 设置了 自定义列的 用户
     * @param fieldCode
     * @return
     */

    int concatUserField(Integer companyId,String type,String fieldCode);
}
